package com.atguigu.controller;

import com.atguigu.pojo.Product;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/product")
@Tag(name = "产品控制器")
public class ProductController {
    @Operation(summary = "新增产品信息")
    @PostMapping("/")
    public Product save(@Parameter(description = "产品请求体参数") @RequestBody Product product){
        return product;
    }
}
